<html>
<head><meta charset="utf-8"><title>branch mismatch safeguards · t-release · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/index.html">t-release</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html">branch mismatch safeguards</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="217117406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217117406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217117406">(Nov 18 2020 at 10:28)</a>:</h4>
<p>I'm thinking how to implement safeguards to prevent that from happening again, it's not the first time we (I) did this :/</p>



<a name="217117466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217117466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Silverstone <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217117466">(Nov 18 2020 at 10:29)</a>:</h4>
<p><span class="user-mention silent" data-user-id="121055">Pietro Albini</span> <a href="#narrow/stream/241545-t-release/topic/1.2E48.20release/near/217117406">said</a>:</p>
<blockquote>
<p>I'm thinking how to implement safeguards to prevent that from happening again, it's not the first time we (I) did this <span aria-label="confused" class="emoji emoji-1f615" role="img" title="confused">:confused:</span></p>
</blockquote>
<p>Can these kinds of promotion PRs be generated by tooling rather than humans perhaps?</p>



<a name="217117485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217117485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217117485">(Nov 18 2020 at 10:29)</a>:</h4>
<p>I guess</p>



<a name="217117498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217117498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217117498">(Nov 18 2020 at 10:30)</a>:</h4>
<p>but like, it also happened for example with beta backports</p>



<a name="217117522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217117522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217117522">(Nov 18 2020 at 10:30)</a>:</h4>
<p>and similar stuff that can't be reasonably implemented manually</p>



<a name="217117864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217117864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Silverstone <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217117864">(Nov 18 2020 at 10:33)</a>:</h4>
<p>Does bors have support for looking at keywords in the PR title and matching that to landing branch? (or could it perhaps?)</p>



<a name="217118261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217118261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217118261">(Nov 18 2020 at 10:36)</a>:</h4>
<p>ok I have a plan, I'm going to prepare a PR in a couple hours</p>



<a name="217118395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217118395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217118395">(Nov 18 2020 at 10:38)</a>:</h4>
<p>we can move the channel to a file triagebot can easily read, like <code>src/ci/channel</code></p>



<a name="217118479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217118479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217118479">(Nov 18 2020 at 10:39)</a>:</h4>
<p>then every time a commit is pushed to a PR triagebot can query the file, and if it's different than the branch you're trying to land the PR to the bot will call the GitHub API to automatically change the target branch and ping you about it</p>



<a name="217121143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217121143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217121143">(Nov 18 2020 at 11:09)</a>:</h4>
<p>Yeah I've done this too</p>



<a name="217121231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217121231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217121231">(Nov 18 2020 at 11:10)</a>:</h4>
<p>With the new version bumping strategy we can just use version file I think? Cc <span class="user-mention" data-user-id="121055">@Pietro Albini</span></p>



<a name="217121242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217121242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217121242">(Nov 18 2020 at 11:10)</a>:</h4>
<p>It should be unique</p>



<a name="217125022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217125022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217125022">(Nov 18 2020 at 11:56)</a>:</h4>
<p>I think having the explicit channel file would be more easy and generic to implement</p>



<a name="217125041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217125041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217125041">(Nov 18 2020 at 11:56)</a>:</h4>
<p>i.e. I was thinking of something like this for <code>triagebot.toml</code>:</p>
<div class="codehilite" data-code-language="TOML"><pre><span></span><code><span class="k">[enforce-branch-name]</span>
<span class="n">file</span> <span class="o">=</span> <span class="s">"src/ci/channel"</span>
<span class="n">map-file-to-branch</span> <span class="o">=</span> <span class="p">{</span>
    <span class="n">nightly</span> <span class="o">=</span> <span class="s">"master"</span><span class="p">,</span>
    <span class="n">beta</span> <span class="o">=</span> <span class="s">"beta"</span><span class="p">,</span>
    <span class="n">stable</span> <span class="o">=</span> <span class="s">"stable"</span><span class="p">,</span>
<span class="p">}</span>
</code></pre></div>



<a name="217125152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217125152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217125152">(Nov 18 2020 at 11:58)</a>:</h4>
<p>that way it's easier to reuse the tool across repositories <span class="user-mention" data-user-id="116122">@simulacrum</span></p>



<a name="217125172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217125172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217125172">(Nov 18 2020 at 11:58)</a>:</h4>
<p>Seems fine, yeah</p>



<a name="217128446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217128446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217128446">(Nov 18 2020 at 12:34)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> btw, are you sure <a href="https://github.com/rust-lang/triagebot/blob/44cb05d7de54c876cd11db5b4c1eb3fdfe3011f6/src/github.rs#L254">https://github.com/rust-lang/triagebot/blob/44cb05d7de54c876cd11db5b4c1eb3fdfe3011f6/src/github.rs#L254</a> is ever getting filled?</p>



<a name="217128463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217128463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217128463">(Nov 18 2020 at 12:34)</a>:</h4>
<p>that would be <code>pull_request.pull_request</code> in the webhook payload</p>



<a name="217128470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217128470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217128470">(Nov 18 2020 at 12:34)</a>:</h4>
<p>which I don't think github sends</p>



<a name="217128697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217128697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217128697">(Nov 18 2020 at 12:37)</a>:</h4>
<p>No? That should be a top level field I think?</p>



<a name="217128718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217128718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217128718">(Nov 18 2020 at 12:37)</a>:</h4>
<p>I think we use it somewhere, not at a computer so can't grep though</p>



<a name="217129257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217129257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217129257">(Nov 18 2020 at 12:44)</a>:</h4>
<p>nope, <code>Issue</code> is inside <code>IssuesEvent</code> <a href="https://github.com/rust-lang/triagebot/blob/44cb05d7de54c876cd11db5b4c1eb3fdfe3011f6/src/github.rs#L706-L710">https://github.com/rust-lang/triagebot/blob/44cb05d7de54c876cd11db5b4c1eb3fdfe3011f6/src/github.rs#L706-L710</a></p>



<a name="217129277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217129277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217129277">(Nov 18 2020 at 12:44)</a>:</h4>
<p>Hm odd</p>



<a name="217129292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217129292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217129292">(Nov 18 2020 at 12:44)</a>:</h4>
<p>We might have custom logic somewhere</p>



<a name="217129306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217129306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217129306">(Nov 18 2020 at 12:45)</a>:</h4>
<p>But it's possible it just doesn't work</p>



<a name="217129320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217129320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217129320">(Nov 18 2020 at 12:45)</a>:</h4>
<p>I think we do use it successfully though</p>



<a name="217168887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217168887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217168887">(Nov 18 2020 at 17:30)</a>:</h4>
<p>wooo beta landed!</p>



<a name="217171230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217171230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217171230">(Nov 18 2020 at 17:47)</a>:</h4>
<p>manually kicked off a beta release</p>



<a name="217181718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/branch%20mismatch%20safeguards/near/217181718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pietro Albini <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/branch.20mismatch.20safeguards.html#217181718">(Nov 18 2020 at 19:06)</a>:</h4>
<p>ok the beta is out</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>